from django.conf.urls.defaults import patterns, include, url

urlpatterns = patterns('tickets.views.public',
	url(r'^$',
		'user_portal',
		name='user_portal')
)

# public view urls
urlpatterns += patterns('tickets.views.public',
		url(r'^ticket/$',
			'ticket_list',
			name='public_ticket_list'),

		url(r'^ticket/status/(?P<t_status>\d)/$',
			'ticket_list',
			name='public_ticket_list_status'),

		url(r'^ticket/(?P<ticket_id>\d+)/$',
			'ticket_detail',
			name='public_ticket_detail'),

		url(r'^ticket/create/$',
			'ticket_create',
			name='public_ticket_create'),

		url(r'^ticket/(?P<ticket_id>\d+)/addnote/$',
			'add_note',
			name='public_add_note'),

		url(r'^ticket/(?P<ticket_id>\d+)/reopen/$',
			'ticket_re_open',
			name='public_ticket_re_open'),
)

# worker view urls
urlpatterns += patterns('tickets.views.worker',
		# display
		url(r'^worker/$',
			'worker_portal',
			name='worker_portal'),

		url(r'^worker/status/(?P<t_status>\d)/$',
			'worker_portal',
			name='worker_portal_status'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/$',
			'worker_portal',
			name='worker_portal_ticket'),

		# change
		url(r'^worker/ticket/(?P<ticket_id>\d+)/addnote/$',
			'worker_add_note',
			name='worker_add_note'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/hold/$',
			'worker_ticket_hold',
			name='worker_ticket_hold'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/unhold/$',
			'worker_ticket_unhold',
			name='worker_ticket_unhold'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/resolve/$',
			'worker_ticket_resolve',
			name='worker_ticket_resolve'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/close/$',
			'worker_ticket_close',
			name='worker_ticket_close'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/reopen/$',
			'worker_ticket_reopen',
			name='worker_ticket_reopen'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/raise/$',
			'worker_raise_priority',
			name='worker_raise_priority'),

		url(r'^worker/ticket/(?P<ticket_id>\d+)/lower/$',
			'worker_lower_priority',
			name='worker_lower_priority'),
)
